﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Pdm.Commons;

namespace Pdm.Solver
{
    public class HeuristikSolver : Solver
    {
        public HeuristikSolver(DmuList dmuList, Dmu objectiveDmu, List<SpecificationInstance> urmWeights)
        {
            this.dmuList = dmuList;
            this.objectiveDmu = objectiveDmu;
            this.urmWeights = urmWeights;
            
            //PdmOptimization opti = new PdmOptimization(dmuList, objectiveDmu, urmWeights);

            Optimization deaOpt = new Optimization(dmuList, objectiveDmu);
            Optimizer.calculateDea(deaOpt);

            this.directions = PdmOptimization.getOptimizationDirections(deaOpt, urmWeights);
            
        }
        public override Pdm.Commons.PdmOptimization getOptimization(double alpha)
        {
            PdmOptimization opt = new PdmOptimization(this.dmuList, this.objectiveDmu, urmWeights, directions, alpha);
            Optimizer.calculatePdm(opt);
            return opt;
        }
    }
}
